import logging
import time

import unittest

from selenium import webdriver
from selenium.webdriver.common.by import By
from Page import Page



from Page import Page

class Test_cese(unittest.TestCase):
    def setUp(self):
        self.driver=webdriver.Edge()
        self.driver.maximize_window()
    
    def tearDown(self):
        time.sleep(10)
        self.driver.quit()

    def test_baidu_01(self):
        logging.info('用列开始执行')
        po=Page(self.driver) #创建page对象
        po.baidu_luoji() #执行百度搜索业务逻辑
        logging.info('用列结束')


        day10 = self.driver.find_element(By.CSS_SELECTOR, '.item.cur').text
        print(day10)
        assert '高级搜索' in day10

if __name__ == '__main__':
    unittest.main()
